#ifndef ADDLEAVEDIALOG_H
#define ADDLEAVEDIALOG_H

#define MORNINGSTR  "上午"
#define AFTERSTR    "下午"
#define ALLSTR     "全天"

#include <QDialog>
#include "datapre.h"
#include <QAbstractButton>
#include <QCloseEvent>
#include<set>


namespace Ui {
class AddLeaveDialog;

}

class AddLeaveDialog : public QDialog
{
    Q_OBJECT

public:
    explicit AddLeaveDialog( MemberManage * mm, DayLeave * dl,QWidget *parent = nullptr);
    ~AddLeaveDialog();
    void showEvent(QShowEvent * event);
    void closeEvent(QCloseEvent * event);
    void accept();

private:
    Ui::AddLeaveDialog *ui;
    MemberManage * mm;
    DayLeave * dl;
signals:
    void saveLeaves();
private slots:
    void on_AddLeaveDialog_accepted();
    void on_buttonBox_clicked(QAbstractButton *button);
};

#endif // ADDLEAVEDIALOG_H
